<template>
	<view class="content">
		<view class="set-top">
			<image :src="$IMG_URL+'logo.png'" style="width: 185rpx;height: 185rpx;margin: 0 auto;display: block;">
			</image>
			<view style="font-size: 23rpx;color: #666666;width: 100%;text-align: center;">V1.31_16</view>
			<view class="flex-row" style="margin-top: 52rpx;">
				<view>暂停接单</view>
				<view style="margin-left: auto;">
					<u-switch v-model="value" inactiveColor="rgb(230, 230, 230)"></u-switch>
				</view>
			</view>
		</view>
		<view class="set-con">
			<view class="con-item" @click="goPath('/pages/user/pass/pass')">
				<view>密码管理</view>
				<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
			</view>
			<u-line color="#d8d8d8"></u-line>
			<!-- #ifndef MP-WEIXIN -->
			<view class="con-item">
				<view>清空缓存</view>
				<view style="font-size: 23rpx;color: #999999;margin-left: auto;">890.91K</view>
				<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: 15rpx;">
			</view>
			<u-line color="#d8d8d8"></u-line>
			<!-- #endif -->
			<view class="con-item" @click="goPath('/pages/user/about/about')">
				<view>关于我们</view>
				<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
			</view>
			<u-line color="#d8d8d8"></u-line>
			<view class="con-item" @click="goweb('https://www.baidu.com/')">
				<view>用户协议</view>
				<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
			</view>
			<u-line color="#d8d8d8"></u-line>
			<view class="con-item" @click="goweb('https://www.baidu.com/')">
				<view>隐私协议</view>
				<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
			</view>
			<u-line color="#d8d8d8"></u-line>
			<view class="con-item" @click="callPhone">
				<view>电话咨询</view>
				<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: auto;">
			</view>

		</view>
		<view class="set-con">
			<view class="con-item" @click="showA = true">
				<view>注销账号</view>
				<view style="font-size: 23rpx;color: #999999;margin-left: auto;">注销后无法恢复，请谨慎操作</view>
				<image :src="$IMG_URL+'jump.png'" style="width: 31rpx;height: 31rpx;margin-left: 15rpx;">
			</view>
		</view>

		<u-popup :show="showA" @close="showA = false" bgColor="transparent" mode="center">
			<view class="pop-con">
				<view style="font-weight: 500;">温馨提示</view>
				<view class="pop-title">
					师傅，请您谨慎注销操作，注销后账户里所有的信息都会丢失，账户里的多项服务都无法继续使用此账户，一旦注销后平台默认放弃账户里所有权益，造成的损失由本人承担，您确定要注销吗？</view>
				<view class="pop-but">
					<view class="pop-but-item" @click="showA = false">取消</view>
					<view class="pop-but-item but-active">确定</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				showA: false,
				value: false
			}
		},
		methods: {
			callPhone() {
				uni.makePhoneCall({
					phoneNumber: '15639251188' //仅为示例
				});
			},
			goweb(src) {
				uni.navigateTo({
					url: `/pages/webview/webview?src=${src}`
				})
			},
			goPath(url) {
				uni.navigateTo({
					url
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		width: 100vw;
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.set-top {
		width: 100vw;
		background: #FFFFFF;
		padding: 46rpx 31rpx 33rpx 31rpx;
		font-size: 27rpx;
		color: #000000;
	}

	.set-con {
		width: 100vw;
		background: #FFFFFF;
		padding: 0 31rpx;
		font-size: 27rpx;
		color: #000000;
		margin-top: 23rpx;
	}

	.con-item {
		padding: 33rpx 0;
		display: flex;
		align-items: center;
	}

	.pop-con {
		width: 519rpx;
		background: #FFFFFF;
		border-radius: 19rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		font-size: 31rpx;
		color: #333333;
		padding-top: 46rpx;

		.pop-title {
			width: 396rpx;
			font-size: 27rpx;
			color: #666666;
			margin-top: 23rpx;
			margin-bottom: 46rpx;
			line-height: 38rpx;
			text-align: justify;
		}

		.pop-but {
			width: 100%;
			display: flex;
			align-items: center;

		}

		.pop-but-item {
			border-top: 1px solid #D8D8D8;
			flex: 1;
			height: 83rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 23rpx;
			color: #333333;
		}

		.but-active {
			border-top: 1px solid #0277DE;
			background-color: #0277DE;
			color: #FFFFFF;
			border-radius: 0 0 19rpx 0;
		}
	}
</style>